function BrandDrawal(params){ 
	 
}

BrandDrawal.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new BrandDrawal.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new BrandDrawal.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new BrandDrawal.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	/** 编号 [非空]       **/
	this.id=function(id){if(this.proxy)return this.getProxy().id(id);  this.put("id", id);return this;};
	/** and id is null */
	this.idNull=function(){if(this.proxy)return this.getProxy().idNull();if(this.get("idNot")==null)this.put("idNot", "");this.put("id", null);return this;};
	/** not .... */
	this.idNot=function(){if(this.proxy)return this.getProxy().idNot();this.put("idNot", "not");return this;};
	this.idNotNull=function(){if(this.proxy)return this.getProxy().idNotNull();this.put("idNot", "not");this.put("id", null);return this;};
	this.idNot=function(id){if(this.proxy)return this.getProxy().idNot(id);this.put("idNot", "not");this.put("id", id);return this;};
	/** and id <= ? */
	this.idMin=function(min){if(this.proxy)return this.getProxy().idMin(min);this.put("idMin", min);return this;};
	/** and id >= ? */
	this.idMax=function(max){if(this.proxy)return this.getProxy().idMax(max);this.put("idMax", max);return this;};
	this.idIn=function(ids){
		if(this.proxy)return this.getProxy().idIn(ids);  this.put("idIn", ids);return this;
	};	
	
	/** 打款编号 [非空]       **/
	this.no=function(no){if(this.proxy)return this.getProxy().no(no);  this.put("no", no);return this;};
	/** and no is null */
	this.noNull=function(){if(this.proxy)return this.getProxy().noNull();if(this.get("noNot")==null)this.put("noNot", "");this.put("no", null);return this;};
	/** not .... */
	this.noNot=function(){if(this.proxy)return this.getProxy().noNot();this.put("noNot", "not");return this;};
	this.noNotNull=function(){if(this.proxy)return this.getProxy().noNotNull();this.put("noNot", "not");this.put("no", null);return this;};
	this.noNot=function(no){if(this.proxy)return this.getProxy().noNot(no);this.put("noNot", "not");this.put("no", no);return this;};
	
	/** 提现品牌商 [非空] [Merchant]      **/
	this.merchant=function(merchant){if(this.proxy)return this.getProxy().merchant(merchant);  this.put("merchant", merchant);return this;};
	/** and merchant is null */
	this.merchantNull=function(){if(this.proxy)return this.getProxy().merchantNull();if(this.get("merchantNot")==null)this.put("merchantNot", "");this.put("merchant", null);return this;};
	/** not .... */
	this.merchantNot=function(){if(this.proxy)return this.getProxy().merchantNot();this.put("merchantNot", "not");return this;};
	this.merchantNotNull=function(){if(this.proxy)return this.getProxy().merchantNotNull();this.put("merchantNot", "not");this.put("merchant", null);return this;};
	this.merchantNot=function(merchant){if(this.proxy)return this.getProxy().merchantNot(merchant);this.put("merchantNot", "not");this.put("merchant", merchant);return this;};
	this.merchantIn=function(ids){
		if(this.proxy)return this.getProxy().merchantIn(ids);  this.put("merchantIn", ids);return this;
	};	
	
	/** 提交人员 [非空] [Manage]      **/
	this.author=function(author){if(this.proxy)return this.getProxy().author(author);  this.put("author", author);return this;};
	/** and author is null */
	this.authorNull=function(){if(this.proxy)return this.getProxy().authorNull();if(this.get("authorNot")==null)this.put("authorNot", "");this.put("author", null);return this;};
	/** not .... */
	this.authorNot=function(){if(this.proxy)return this.getProxy().authorNot();this.put("authorNot", "not");return this;};
	this.authorNotNull=function(){if(this.proxy)return this.getProxy().authorNotNull();this.put("authorNot", "not");this.put("author", null);return this;};
	this.authorNot=function(author){if(this.proxy)return this.getProxy().authorNot(author);this.put("authorNot", "not");this.put("author", author);return this;};
	this.authorIn=function(ids){
		if(this.proxy)return this.getProxy().authorIn(ids);  this.put("authorIn", ids);return this;
	};	
	
	/** 支付宝账号 [非空]       **/
	this.alipayNo=function(alipayNo){if(this.proxy)return this.getProxy().alipayNo(alipayNo);  this.put("alipayNo", alipayNo);return this;};
	/** and alipay_no is null */
	this.alipayNoNull=function(){if(this.proxy)return this.getProxy().alipayNoNull();if(this.get("alipayNoNot")==null)this.put("alipayNoNot", "");this.put("alipayNo", null);return this;};
	/** not .... */
	this.alipayNoNot=function(){if(this.proxy)return this.getProxy().alipayNoNot();this.put("alipayNoNot", "not");return this;};
	this.alipayNoNotNull=function(){if(this.proxy)return this.getProxy().alipayNoNotNull();this.put("alipayNoNot", "not");this.put("alipayNo", null);return this;};
	this.alipayNoNot=function(alipayNo){if(this.proxy)return this.getProxy().alipayNoNot(alipayNo);this.put("alipayNoNot", "not");this.put("alipayNo", alipayNo);return this;};
	
	/** 支付宝姓名        **/
	this.alipayName=function(alipayName){if(this.proxy)return this.getProxy().alipayName(alipayName);  this.put("alipayName", alipayName);return this;};
	/** and alipay_name is null */
	this.alipayNameNull=function(){if(this.proxy)return this.getProxy().alipayNameNull();if(this.get("alipayNameNot")==null)this.put("alipayNameNot", "");this.put("alipayName", null);return this;};
	/** not .... */
	this.alipayNameNot=function(){if(this.proxy)return this.getProxy().alipayNameNot();this.put("alipayNameNot", "not");return this;};
	this.alipayNameNotNull=function(){if(this.proxy)return this.getProxy().alipayNameNotNull();this.put("alipayNameNot", "not");this.put("alipayName", null);return this;};
	this.alipayNameNot=function(alipayName){if(this.proxy)return this.getProxy().alipayNameNot(alipayName);this.put("alipayNameNot", "not");this.put("alipayName", alipayName);return this;};
	
	/** 接收短信手机号        **/
	this.branddPhone=function(branddPhone){if(this.proxy)return this.getProxy().branddPhone(branddPhone);  this.put("branddPhone", branddPhone);return this;};
	/** and brandd_phone is null */
	this.branddPhoneNull=function(){if(this.proxy)return this.getProxy().branddPhoneNull();if(this.get("branddPhoneNot")==null)this.put("branddPhoneNot", "");this.put("branddPhone", null);return this;};
	/** not .... */
	this.branddPhoneNot=function(){if(this.proxy)return this.getProxy().branddPhoneNot();this.put("branddPhoneNot", "not");return this;};
	this.branddPhoneNotNull=function(){if(this.proxy)return this.getProxy().branddPhoneNotNull();this.put("branddPhoneNot", "not");this.put("branddPhone", null);return this;};
	this.branddPhoneNot=function(branddPhone){if(this.proxy)return this.getProxy().branddPhoneNot(branddPhone);this.put("branddPhoneNot", "not");this.put("branddPhone", branddPhone);return this;};
	
	/** 提现金额 [非空]       **/
	this.money=function(money){if(this.proxy)return this.getProxy().money(money);  this.put("money", money);return this;};
	/** and money is null */
	this.moneyNull=function(){if(this.proxy)return this.getProxy().moneyNull();if(this.get("moneyNot")==null)this.put("moneyNot", "");this.put("money", null);return this;};
	/** not .... */
	this.moneyNot=function(){if(this.proxy)return this.getProxy().moneyNot();this.put("moneyNot", "not");return this;};
	this.moneyNotNull=function(){if(this.proxy)return this.getProxy().moneyNotNull();this.put("moneyNot", "not");this.put("money", null);return this;};
	this.moneyNot=function(money){if(this.proxy)return this.getProxy().moneyNot(money);this.put("moneyNot", "not");this.put("money", money);return this;};
	/** and money <= ? */
	this.moneyMin=function(min){if(this.proxy)return this.getProxy().moneyMin(min);this.put("moneyMin", min);return this;};
	/** and money >= ? */
	this.moneyMax=function(max){if(this.proxy)return this.getProxy().moneyMax(max);this.put("moneyMax", max);return this;};
	
	/** 拒绝理由        **/
	this.reason=function(reason){if(this.proxy)return this.getProxy().reason(reason);  this.put("reason", reason);return this;};
	/** and reason is null */
	this.reasonNull=function(){if(this.proxy)return this.getProxy().reasonNull();if(this.get("reasonNot")==null)this.put("reasonNot", "");this.put("reason", null);return this;};
	/** not .... */
	this.reasonNot=function(){if(this.proxy)return this.getProxy().reasonNot();this.put("reasonNot", "not");return this;};
	this.reasonNotNull=function(){if(this.proxy)return this.getProxy().reasonNotNull();this.put("reasonNot", "not");this.put("reason", null);return this;};
	this.reasonNot=function(reason){if(this.proxy)return this.getProxy().reasonNot(reason);this.put("reasonNot", "not");this.put("reason", reason);return this;};
	
	/** 打款日志        **/
	this.log=function(log){if(this.proxy)return this.getProxy().log(log);  this.put("log", log);return this;};
	/** and log is null */
	this.logNull=function(){if(this.proxy)return this.getProxy().logNull();if(this.get("logNot")==null)this.put("logNot", "");this.put("log", null);return this;};
	/** not .... */
	this.logNot=function(){if(this.proxy)return this.getProxy().logNot();this.put("logNot", "not");return this;};
	this.logNotNull=function(){if(this.proxy)return this.getProxy().logNotNull();this.put("logNot", "not");this.put("log", null);return this;};
	this.logNot=function(log){if(this.proxy)return this.getProxy().logNot(log);this.put("logNot", "not");this.put("log", log);return this;};
	
	/** 修改时间 [非空]       **/
	this.updateTime=function(updateTime){if(this.proxy)return this.getProxy().updateTime(updateTime);  this.put("updateTime", updateTime);return this;};
	/** and update_time is null */
	this.updateTimeNull=function(){if(this.proxy)return this.getProxy().updateTimeNull();if(this.get("updateTimeNot")==null)this.put("updateTimeNot", "");this.put("updateTime", null);return this;};
	/** not .... */
	this.updateTimeNot=function(){if(this.proxy)return this.getProxy().updateTimeNot();this.put("updateTimeNot", "not");return this;};
	this.updateTimeNotNull=function(){if(this.proxy)return this.getProxy().updateTimeNotNull();this.put("updateTimeNot", "not");this.put("updateTime", null);return this;};
	this.updateTimeNot=function(updateTime){if(this.proxy)return this.getProxy().updateTimeNot(updateTime);this.put("updateTimeNot", "not");this.put("updateTime", updateTime);return this;};
	/** and update_time >= ? */
	this.updateTimeStart=function(start){if(this.proxy)return this.getProxy().updateTimeStart(start);this.put("updateTimeStart", start);return this;};			
	/** and update_time <= ? */
	this.updateTimeEnd=function(end){if(this.proxy)return this.getProxy().updateTimeEnd(end);this.put("updateTimeEnd", end);return this;};
	
	/** 添加时间 [非空]       **/
	this.addTime=function(addTime){if(this.proxy)return this.getProxy().addTime(addTime);  this.put("addTime", addTime);return this;};
	/** and add_time is null */
	this.addTimeNull=function(){if(this.proxy)return this.getProxy().addTimeNull();if(this.get("addTimeNot")==null)this.put("addTimeNot", "");this.put("addTime", null);return this;};
	/** not .... */
	this.addTimeNot=function(){if(this.proxy)return this.getProxy().addTimeNot();this.put("addTimeNot", "not");return this;};
	this.addTimeNotNull=function(){if(this.proxy)return this.getProxy().addTimeNotNull();this.put("addTimeNot", "not");this.put("addTime", null);return this;};
	this.addTimeNot=function(addTime){if(this.proxy)return this.getProxy().addTimeNot(addTime);this.put("addTimeNot", "not");this.put("addTime", addTime);return this;};
	/** and add_time >= ? */
	this.addTimeStart=function(start){if(this.proxy)return this.getProxy().addTimeStart(start);this.put("addTimeStart", start);return this;};			
	/** and add_time <= ? */
	this.addTimeEnd=function(end){if(this.proxy)return this.getProxy().addTimeEnd(end);this.put("addTimeEnd", end);return this;};
	
	/** 状态 [非空]   1:待审核 2:打款成功 3:审核拒绝 4:打款失败 0:无效     **/
	this.status=function(status){if(this.proxy)return this.getProxy().status(status);  this.put("status", status);return this;};
	/** and status is null */
	this.statusNull=function(){if(this.proxy)return this.getProxy().statusNull();if(this.get("statusNot")==null)this.put("statusNot", "");this.put("status", null);return this;};
	/** not .... */
	this.statusNot=function(){if(this.proxy)return this.getProxy().statusNot();this.put("statusNot", "not");return this;};
	this.statusNotNull=function(){if(this.proxy)return this.getProxy().statusNotNull();this.put("statusNot", "not");this.put("status", null);return this;};
	this.statusNot=function(status){if(this.proxy)return this.getProxy().statusNot(status);this.put("statusNot", "not");this.put("status", status);return this;};
	this.statusIn=function(ids){
		if(this.proxy)return this.getProxy().statusIn(ids);  this.put("statusIn", ids);return this;
	};	
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有品牌商提现 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/finance/branddrawal.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取品牌商提现分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/finance/branddrawal.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取品牌商提现 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/finance/branddrawal.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

BrandDrawal.get = function(id){
	var protocol = ux.ajax("/admin/finance/branddrawal.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.brandDrawal;
	return null;
}

BrandDrawal.where = new BrandDrawal.Where(0,true);